﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;
using ModuleExternalProducersAdd.ViewModels;

namespace ModuleExternalProducersAdd.Commands
{
    public class AddProductToProducerCommand : ICommand
    {
        private IProducerAddViewModel m_producerAddViewModel;


        public AddProductToProducerCommand(IProducerAddViewModel producerAddViewModel)
        {
            m_producerAddViewModel = producerAddViewModel;
        }


        public bool CanExecute(object parameter)
        {
            return true;
        }

        public void Execute(object parameter)
        {
            m_producerAddViewModel.AddProductToProducer();
        }


        public event EventHandler CanExecuteChanged;
    }
}
